<div class="notice">
  <nz-collapseset>
    <nz-collapse [nzTitle]="panels.name" [nzActive]="panels.active" [nzDisabled]="panels.disabled">
      <form nz-form [nzLayout]="'inline'">
        <div nz-row>
            <div nz-form-item nz-col [nzSpan]="6">
              <div nz-form-label nz-col [nzSm]="9" [nzXs]="6">
                <label>是否已读</label>
              </div>
              <div nz-form-control>
                <nz-select style="width: 150px;" nzAllowClear [nzPlaceHolder]="'请选择'" [(ngModel)]="isRead" [nzShowSearch]="true"
                           name="isRead">
                  <nz-option [nzLabel]="'未读'" [nzValue]="'0'" [nzDisabled]="false">
                  </nz-option>
                  <nz-option [nzLabel]="'已读'" [nzValue]="'1'" [nzDisabled]="false">
                  </nz-option>
                </nz-select>
              </div>
            </div>


            <div  nz-form-label nz-col [nzSpan]="1">
              <label>时间</label>
            </div>
            <div nz-form-item nz-col [nzSpan]="8">
              <nz-datepicker style="width: 40%;" name="1" (ngModelChange)="_startDate=$event;_startValueChange()" [ngModel]="_startDate"
                [nzDisabledDate]="_disabledStartDate" [nzShowTime]="true" [nzFormat]="'YYYY-MM-DD HH:mm:ss'"
                [nzPlaceHolder]="'开始时间'"></nz-datepicker>
              至
              <nz-datepicker style="width: 40%;" name="2" (ngModelChange)="_endDate=$event;_endValueChange()" [ngModel]="_endDate"
                [nzDisabledDate]="_disabledEndDate" [nzShowTime]="_endTime" [nzFormat]="'YYYY-MM-DD HH:mm:ss'"
                [nzPlaceHolder]="'结束时间'"></nz-datepicker>
            </div>

          <button nz-button [nzSize]="'default'" [nzType]="'primary'" (click)="query()">查询</button>
          <button style="margin-left: 20px;" nz-button *ngIf="isJG" [nzSize]="'default'" [nzType]="'primary'" (click)="querySend()">查询本人</button>

        </div>

      </form>
    </nz-collapse>
  </nz-collapseset>
  <!--<ul nz-menu [nzMode]="'horizontal'">
        <li  nz-menu-item (click)="add(title, content, footer)"><i class="anticon anticon-plus"></i>添加</li>
        <li  nz-menu-item (click)="update(title, content, footer)"><i class="anticon anticon-copy"></i>修改</li>
        <li  nz-menu-item (click)="delete()"><i class="anticon anticon-delete"></i>删除</li>

    </ul>-->
  <nz-table #nzTable [nzDataSource]="list" nzSize="middle" [nzBordered]="true" [nzIsPagination]="false" (nzDataChange)="displayDataChange($event)">
    <thead nz-thead>
      <tr>
        <th nz-th [nzCheckbox]="true">
          <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
          </label>
        </th>
        <th nz-th>
          <span>标题</span>
        </th>
        <th nz-th>
          <span>内容(点击查看明细)</span>
        </th>
        <th nz-th>
          <span>通知时间</span>
        </th>
        <th *ngIf="isSend" nz-th>
          被通知者
        </th>
        <th nz-th>
          <span>通知者</span>
        </th>
        <th nz-th>
          <span>是否已读</span>
        </th>
        <th nz-th>
          <span>附件</span>
        </th>
      </tr>
    </thead>
    <tbody nz-tbody>
      <tr nz-tbody-tr *ngFor="let data of list">
        <td nz-td [nzCheckbox]="true">
          <label nz-checkbox [nzDisabled]="data.disabled" [(ngModel)]="data.checked" (ngModelChange)="refreshStatus($event)">
          </label>
        </td>
        <td nz-td>{{data.title}}</td>
        <td nz-td class="little" (click)="detailNotification(data)">{{data.content | little}}</td>
        <td nz-td>{{data.noticeTime | timeTrans}}</td>
        <td *ngIf="isSend" nz-td>{{data.receiveUserName}}</td>
        <td nz-td>{{data.sendUserName}}</td>
        <td nz-td>{{data.isRead=="0"?"未读":"已读"}}</td>
        <td nz-td>
          <span *ngIf="data.fileUrls">
            <button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="show(data.fileUrls)">查看</button>
          </span>
        </td>
      </tr>
    </tbody>
  </nz-table>

  <nz-pagination [nzPageIndex]="noticeBean.currentPage" nzShowTotal [nzTotal]="total" nzShowSizeChanger
    (nzPageSizeChange)="nzPageSizeChange($event)" (nzPageIndexChange)="nzPageIndexChange($event)"
    (nzPageIndexClickChange)="nzPageIndexClickChange($event)" [nzPageSize]="noticeBean.pageSize"></nz-pagination>

  <!-- 图片回显 -->
  <ng-template #titlepic>
    <span>附件</span>
  </ng-template>
  <ng-template #contentpic>
    <enlarge-pic [inValue]="picList" (outPut)="addOutPut($event)"></enlarge-pic>
  </ng-template>
  <ng-template #footerpic>
    <div>
    </div>
  </ng-template>

</div>
